<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/doc/src/designer-manual.qdoc -->
<head>
  <title>Qt 4.3: Customizing Qt Designer Forms</title>
  <link rel="prev" href="designer-resources.html" />
  <link rel="contents" href="designer-manual.html" />
  <link rel="next" href="designer-using-custom-widgets.html" />
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><p>
[Previous: <a href="designer-resources.html">Editing Resources with Qt Designer</a>]
[<a href="designer-manual.html">Contents</a>]
[Next: <a href="designer-using-custom-widgets.html">Using Custom Widgets with Qt Designer</a>]
</p>
<h1 align="center">Customizing Qt Designer Forms<br /><small></small></h1>
<p align="center"><img src="images/designer-form-settings.png" /></p><p>When saving a form in <i>Qt Designer</i>, it is stored as an <tt>.ui</tt> file. Several form settings, for example the grid settings or the margin and spacing for the default layout, are stored along with the form's components. These settings are used when the <a href="uic.html#uic">uic</a> generates the form's C++ code. For more information on how to use forms in your application, see the <a href="designer-manual.html#using-forms-and-components">Using Forms and Components</a> section.</p>
<a name="modifying-the-form-settings"></a>
<h2>Modifying the Form Settings</h2>
<p>To modify the form settings, open the <b>Form</b> menu and select <b>Form Settings..&#x2e;</b></p>
<p>In the forms settings dialog you can specify the <b>Author</b> of the form.</p>
<p>You can also alter the margin and spacing properties for the form's default layout (<b>Layout Default</b>). These default layout properties will be replaced by the corresponding <b>Layout Function</b>, if the function is specified, when <tt>uic</tt> generates code for the form. The form settings dialog lets you specify functions for both the margin and the spacing.</p>
<a name="layoutfunction"></a><p><table align="center" cellpadding="2" cellspacing="1" border="0">
<tr valign="top" class="odd"><td><img src="images/designer-form-layoutfunction.png" /></td><td><b>Layout Function</b><p>The default layout properties will be replaced by the corresponding <b>Layout Function</b>, when <tt>uic</tt> generates code for the form.</p>
<p>This is useful when different environments requires different layouts for the same form.</p>
<p>To specify layout functions for the form's margin and spacing, check the <b>Layout Function</b> group box to enable the line edits.</p>
</td></tr>
</table></p>
<p>You can also specify the form's <b>Include Hints</b>; i.e&#x2e; provide a list of the header files which then will be included in the form window's associated <tt>.ui</tt> file. Header files may be local, i.e&#x2e; relative to the project's directory, <tt>&quot;mywidget.h&quot;</tt>, or global, i.e&#x2e; part of Qt or the compilers standard libraries: <tt>&lt;QtGui/QWidget&gt;</tt>.</p>
<p>Finally, you can specify the function used to load pixmaps into the form window (the <b>Pixmap Function</b>).</p>
<p>
[Previous: <a href="designer-resources.html">Editing Resources with Qt Designer</a>]
[<a href="designer-manual.html">Contents</a>]
[Next: <a href="designer-using-custom-widgets.html">Using Custom Widgets with Qt Designer</a>]
</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
